package cn.tedu.douguo.user.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 分类表
 * @TableName cms_category
 */
@TableName(value ="cms_category")
@Data
@Accessors(chain = true)
public class Category implements Serializable {
    /**
     * 分列表id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 一级关键字
     */
    @TableField(value = "name")
    private String name;

    /**
     * 父级id
     */
    @TableField(value = "parent_id")
    private Long parentId;

    /**
     * 深度
     */
    @TableField(value = "depth")
    private Integer depth;

    /**
     * 0代表无父级
     */
    @TableField(value = "is_parent")
    private Integer isParent;


}